package com.zjitc.controller;

import com.sun.org.apache.bcel.internal.generic.NEW;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.InternalResourceView;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/19 16:17
 * @description:
 */
@Controller
public class GiveDataController {
    @RequestMapping("/data")
  public ModelAndView handler(){
      ModelAndView mv =new ModelAndView();

      mv.setView(new InternalResourceView("/data.jsp"));
      mv.addObject("age",10);
      mv.addObject("name","hfsjkdfgjkd");
      return mv;
    }

}
